import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

import '../../Splash.dart';

class HeroDemo extends StatefulWidget {
  const HeroDemo({super.key});

  @override
  State<HeroDemo> createState() => _HeroDemoState();
}

class _HeroDemoState extends State<HeroDemo> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Hero"),
      ),
      body: Center(
        child: Hero(
          tag: 'HeroTag',
          child: TextButton(
            onPressed: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => const SplashScreen()),
              );
            },
            child: SvgPicture.asset(
              'assets/images/chat.svg',
            ),
          ),
        ),
      ),
    );
  }
}
